using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyAnimationEvent : EntityAnimationEvent
{
    private Enemy enemy;
    private Enemy_VFX enemyVFX;
    protected override void Awake()
    {
        base.Awake();
        enemy = GetComponentInParent<Enemy>();
        enemyVFX = GetComponentInParent<Enemy_VFX>();
    }
    //进入敌人眩晕窗口期
    public void OnEnableStunned()
    {
        enemy.OnEnableStunnedWindow(true);
        enemyVFX.EnableAttackAlert(true);
    }
    //退出敌人眩晕窗口期
    public void OnDisableStunned()
    {
        enemy.OnEnableStunnedWindow(false);
        enemyVFX.EnableAttackAlert(false);
    }
    public void OnRemoteAttack()
    {
        enemy.RemoteAttack();
    }
}
